home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Business Assistant
/
Business Assistant.iso
/
checkb
/
pccheck
/
pc-check.pas
< prev
Wrap
Pascal/Delphi Source File
|
1984-09-16
|
45KB
|
1,240 lines
Program PC_Check;
{$C-}
{ PC-Check Copyright (c) The Forbin Project and John Friel III
PC-Check is a checkbook and savings record keeper produced
by the Forbin Project. Like some public domain software, we
are asking for a donation for the use of this program. A
donation of only $5.00 is requested. Those that do donate
will receive published announcements for future enhancements
to PC-Check and other programs written by the Forbin Project.
PC-Check may be transferred to other people under two (2)
conditions; that there is NO CHARGE for the copy(s) and that
the source program not be modified in any way, shape or form.
The user may modify the source code to suit his or her own
personal tastes. All rights reserved by the Forbin Project.
Please keep an unmodified copy around just for this purpose.
For more information on this program or more detailed
information on interfacing TURBO Pascal with the IBM PC or
Compatibles, (this was developed on a Tava PC!) please write to
the Forbin Project at :
The Forbin Project
John Friel III
715 Walnut Street
Cedar Falls, Iowa 50613
}
Const
blink_yes = true;
blink_no = false;
yes_no : set of char = ['Y','y','N','n'];
filechars : set of char = ['A'..'Z','a'..'z','0'..'9',':',
'!','$','@','#','%','-','&'];
type
check_trans = (cdeposit, cwithdrawl, cinterest,
sdeposit, swithdrawl, sinterest);
check_type = record
post_date : string[8];
check_no : integer;
to_who : string[40];
amount : real;
memo : string[30];
check_tran: check_trans;
cleared : boolean;
end;
Names = String[80];
Screen_Array = Array [1..4000] of byte;
months = 1..12;
days = 1..31;
years = 0..99;
xxxstr80 = string[80];
xxxstr8 = string[8];
xxxfile = file;
Var
st1, st2, st3 : string[2];
n_amount,temp_date : string[8];
n_check_num : string[5];
new_amount, amount_h : real;
t_cdc, t_cwc, t_cic,
t_sdc, t_swc, t_sic,
t_cdu, t_cwu, t_ciu,
t_sdu, t_swu, t_siu,
tcc, tcs, rbs, rbc : real;
rc, check_num_h : integer;
month : months;
day : days;
year : years;
trnfile : file of check_type;
one_trn : check_type;
x, i, y, q, e, w, check_num : Integer;
to_whom, to_who_h : string[40];
new_memo, memo_h : string[30];
Ok, bool, done, edit_ok : Boolean;
FileName : Names;
Real_Screen : Screen_Array absolute $B800:$0000;
Temp_Screen, temp_Screen2 : Screen_Array;
Ch, ch1,ch2 : Char;
check_tran_h : check_trans;
function readdate(x,y:integer):xxxstr8;
{ reads a string from the terminal from screen at position xy }
{ the string will contain a Valid date in format 00/00/00 }
Var
hold : array [1..6] of char;
location : integer;
inchar : char;
begin
location := 1;
gotoxy(x,y);
write(' / / ');
gotoxy(x,y);
while location<8 do
begin
read(kbd,inchar);
case location of
1:
begin
gotoxy(x,y);
if inchar in ['1','0',' '] then
begin
hold[1] := inchar;
write(inchar);
location := 2;
gotoxy((x+1),y);
end
else
begin
write(chr(7));
end;
end;
2:
begin
gotoxy((x+1),y);
if inchar in ['1'..'9','0'] then
if hold[1]='1' then
if inchar in ['1','2','0'] then
begin
hold[2] := inchar;
write(inchar);
location := 3;
end
else
begin
write(chr(7));
end
else
begin
write(inchar);
hold[2] := inchar;
location := 3;
end
else
if ((inchar = chr(8)) or (inchar = chr(7))) then
begin
gotoxy(x,y);
write(' ');
location := 1;
hold[1] := ' ';
gotoxy(x,y);
end
else
begin
write(chr(7));
end;
end;
3:
begin
gotoxy((x+3),y);
if inchar in ['1'..'3','0',' '] then
begin
hold[3] := inchar;
write(inchar);
location := 4;
gotoxy((x+4),y);
end
else
if ((inchar = chr(8)) or (inchar = chr(7))) then
begin
gotoxy((x+1),y);
write(' ');
location := 2;
hold[2] := ' ';
gotoxy((x+1),y);
end
else
begin
write(chr(7));
end;
end;
4:
begin
gotoxy((x+4),y);
if inchar in ['1'..'9','0'] then
begin
hold[4] := inchar;
write(inchar);
location := 5;
gotoxy((x+6),y);
end
else
if ((inchar = chr(8)) or (inchar = chr(7))) then
begin
gotoxy((x+3),y);
write(' ');
location := 3;
hold[3] := ' ';
gotoxy((x+3),y);
end
else
begin
write(chr(7));
end;
end;
5:
begin
gotoxy((x+6),y);
if inchar in ['1'..'9','0'] then
begin
hold[5] := inchar;
write(inchar);
location := 6;
gotoxy((x+7),y);
end
else
if ((inchar = chr(8)) or (inchar = chr(7))) then
begin
gotoxy((x+4),y);
write(' ');
location := 4;
hold[4] := ' ';
gotoxy((x+4),y);
end
else
begin
write(chr(